# def count(n):

#     def get():
#         return n

#     def inc():
#          global n # different 'n' and we have to define global 'n'
#          n += 1 # we are inside local scope and there is 'n' at compile time

#     return get, inc

def count(m):
    n = [m]

    def get():
        return n[0]

    def inc():
        n[0] += 1

    return get, inc

get, inc = count(10)
print get()
inc()
print get()

# in python3 nonlocal n ->
